@extends('admin.master')
<script src="/js/admin/index.js"></script>
@section('title', '账号管理')
	
@section('firstItem')
@parent
				<span>账号管理</span>
				<input class="a_indexbg" type="hidden" value="index" />
@stop
@section('searchList')
@parent
				<div class="seizeBox"></div>
@stop
@section('dataTables')
@parent
			<table class="accountManage dataTables" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<td>序号</td>
						<td>登录账号</td>
						<td>姓名</td>
						<td>电话</td>
						<td>账号属性</td>
						<td>账号管理</td>
					</tr>
				</thead>
				<tbody>
					@for($i=0, $adminInfoCount=count($admin_infos); $i<$adminInfoCount; $i++)
					<tr >
						<td>{{ $i+1 }}</td>
						<td class="accountNumCell">{{ $admin_infos[$i]->user->username }}</td>
						<td class="accountUserCell">{{ $admin_infos[$i]->name }}</td>
						<td class="accountPhoneCell">{{ $admin_infos[$i]->phone }}</td>
						<td class="accountPropertiesCell">{{ $admin_infos[$i]->user->roles->first()->name }}</td>
						<td>
							<p class="cellBtn">
								<span class="writeBtn indexWriteBtn">编辑</span>
								<input type="hidden" value="{{ $admin_infos[$i]->user_id }}" />
								<span class="deleteBtn indexDeleteBtn">删除</span>
								<input type="hidden" value="{{ $admin_infos[$i]->user_id }}" />
							</p>
						</td>
					</tr>
					@endfor
				</tbody>
			</table>
@stop
@section('add_div')
	@parent
	<div class="addInfosBtn addInstallInfos">添加账号</div>	
@stop
@section('page_num')
<ul class="pagination pagination-lg"> 
	@if($user->hasAccess(['admin']))
		{!! $admin_infos->render() !!}
	@endif
</ul>			
@stop
@section('infor_promit')
@parent
	<!-- 添加账号信息弹框 -->
	<div class="accountManageBox accountManageAdd" >
		<div><span>登录账号</span><input class="accountAddNum" type="text" placeholder="账号不能大于12位字符" /><label class="required">*</label></div>
		<div><span>姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名</span><input class="magagerAddName" type="text" value="" placeholder="请填姓名" /><label class="required">*</label></div>
		<div><span>手机号码</span><input class="managerAddPhone" type="text" value="" placeholder="请填手机号码" /><label class="required">*</label></div>
		<div style="margin-top: 15px;"><span>输入密码</span><input class="managerAPassword" type="password" value="" placeholder="密码不少于6位字符" /><label class="required">*</label></div>
		<div><span>确认密码</span><input class="managerANPassword" type="password" value="" placeholder="密码不少于6位字符" /><label class="required">*</label></div>
		<div><span>账号属性</span><span class="generalManager">普通管理员</span></div>
		<label class="labelBox" id="indexALabelBox" style="margin-bottom: 0;"></label>
		<div class="btnBox btnAddBox" >
			<a class="cancelBtn indexAddCancelBtn">取消</a>
			<a class="okBtn indexAddOkBtn">确定</a>
		</div>
	</div>

	<!-- 编辑账号信息弹框 -->
	<div class="accountManageBox accountManageEdit" >
		<div><span>登录账号</span><label class="accountENum"></label></div>
		<div><span>姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名</span><input class="magagerEName" type="text" value="" placeholder="请填姓名" /><label class="required">*</label></div>
		<div><span>手机号码</span><input class="managerEPhone" type="text" value="" placeholder="请填手机号码" /><label class="required">*</label></div>
		<div class="">
			<span>账号属性</span>
			<span class="accountEProperty"></span>
		</div>
		<label class="labelBox" id="indexEditLabelBox"></label>
		<div class="btnBox" >
			<a class="cancelBtn indexCancelBtn">取消</a>
			<a class="okBtn indexOkBtn">确定</a>
		</div>
	</div>
	<!-- 删除账号 -->
	<div class="deleteAccount">
		<div class="accountList">
			<p><span>姓名:</span><label class="deletLName">64613213456</label></p>
			<p style="float: right;"><span>手机号码:</span><label class="deletLPhone">12</label></p>
		</div>
		<div class="accountList">
			<p><span>登录账号:</span><label class="deleteANum">45645435</label></p>
			<p style="float: right;"><span>账号属性:</span><label class="deleteLProperty">普通管理员</label></p>
		</div>
		<div class="hintText">确定删除该账号？</div>
		<label class="labelBox" id="indexDLabelBox"></label>
		<div class="btnBox">
			<a class="indexDCancelBtn indexDCancelBtn">取消</a>
			<a class="okBtn indexDOkBtn">确定</a>
		</div>
	</div>
@stop
